package yf.mall.dao;

import com.yf.dao.BaseDao;
import yf.mall.entity.MallStoreEntity;
import yf.mall.vo.MallStoreVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 产品库存Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Sun Sep 29 09:50:50 CST 2019
 */
@Mapper
public interface MallStoreDao extends BaseDao<MallStoreEntity> {


//    List<MallStoreVo> queryListVo(MallStoreVo mallStoreVo);
//
//    MallStoreVo getVo(Long id);

    List<MallStoreVo> findByUserId(Long userId);

    MallStoreEntity findByUserIdAndGoodsId(@Param("userId") Long userId, @Param("goodsId") Long goodsId);

    void increase(@Param("userId") Long userId, @Param("goodsId") Long goodsId, @Param("quantity") Integer quantity);

    void decrease(@Param("userId") Long userId, @Param("goodsId") Long goodsId, @Param("quantity") Integer quantity);


}
